The invention generally relates to implant able medical devices and in particular to methods and apparatus for timing events within implantable medical devices capable of performing concurrent multiple processes, tasks or functions.
A wide range of implantable medical devices used for cardiac rhythm management are provided for surgical implantation into humans or animals. Examples of cardiac rhythm management devices are cardiac pacemakers and cardioverter/defibrillators (ICD). Other examples include devices for stimulating or sensing portions of the brain, spinal cord, muscles, bones, nerves, glands or other body organs or tissues. State of the art implantable medical devices are typically configured to perform a variety of tasks concurrently. For example, a pacemaker or ICD may analyze cardiac rhythm signals received from the heart to identify any arrhythmias to permit therapy to be applied. Concurrently, the pacemaker or ICD may monitor the battery or other power source of the device to verify that the power source is capable of providing the appropriate voltage and current for functions such as pacing or defibrillation. Likewise, the device may concurrently monitor the impedance of leads connected to the heart to verify that there are no faults in the leads. Some functions are unique to the particular implantable medical device. For example, an ICD contains capacitors for use in generating a defibrillation pulse. For proper operation, the capacitor needs to be reformed periodically every two to four months to prevent charge time degradation. Accordingly, the ICD periodically performs a capacitor reformation function. A wide variety of other tasks maybe performed as well by the implantable medical device. In many cases, the tasks are performed by a microprocessor of the device. In other cases, separate dedicated hardware components of the device are employed.
Many of the tasks performed by the implantable medical device require that certain periods of time be tracked to facilitate completion of the task. For example, to analyze cardiac rhythm signals, the corresponding function may require that each cardiac pulse, i.e. each individual or components of the QRS complex, be timed with respect to others. As such, a timer capable of measuring time lasting in the order of a few to hundredths of milliseconds is required. For other functions, such as monitoring the power source or the leads or for performing capacitor reformation, the time periods that need to be timed are on the order of minutes, hours, weeks, months, or years.
To time an event, a software component such as (but not limited to) a task, object, function, subroutine, in-line code, interrupt service routine, operating system call, mainline code, etc.) typically makes a request to a timer manager or operating system component. The request specifies that an interrupt be generated by a hardware timer incorporated within the device following the expiration of a predetermined amount of time (or that some other timer completion signal be generated). For timing short-term events, such as events spanning only a few milliseconds, a timer with eight or sixteen bits may be required. To time even longer events, such as events spanning hours, weeks, months, or years, a timer having sufficient memory bits (32, 64 or 128 bits) to register the long periods of time is required. Such timers are also commonly found in desktop computers, laptop commuters, cellular telephones and the like. To accommodate the possibility of several concurrent processes, several such timers are often employed, each providing high timing resolution and others having sufficient memory to accommodate long time duration.
However, within implantable medical devices it is critical that the size of the device and the amount of power consumed by the device be minimized. Power must be minimized to ensure that the power supply lasts for several years. The size of the device must be minimized to make it as light as possible to reduce discomfort to the patient after the device has been implanted. Unfortunately, with implantable medical devices implemented using timing devices as described above, neither device power nor device size is minimized. A set of hardware timers each counting time in parallel is an undesirable expenditure of power.
Size of the device is not effectively minimized because each timer requires a large number of memory registers to accommodate the potentially large timing periods. Hence, the physical size of an integrated circuit or other device used to implement the timer is not minimized. Moreover, with each timer configured to accommodate long timing periods, considerable current is consumed powering the many memory registers of the counter.
As noted, if multiple concurrent processes need to be timed, the implantable medical device is often configured to provide several timers each providing high timing resolution and having sufficient memory to accommodate long timing durations. Accordingly, power consumption and device size increases accordingly. Furthermore, to accommodate the multiple processes and the multiple timers, numerous timer requests need to be generated and tracked, resulting in an increase in the overall system complexity.
Thus, it would be desirable to provide an improved hardware timing system for use within an implantable medical device and it is to that end that aspects of the invention are primarily directed.
In accordance with the invention, a device is provided for timing software or hardware events for use in an implantable cardiac rhythm management device (which is used synonymously with implantable medical device) such as a pacemaker and a cardioverter/defibrillator capable of performing a plurality of concurrent processes. The timing device comprises a first timing means for timing events using a first timing interval and a second timing means for timing events using a second timing interval, with the second timing interval being substantially greater than the first timing interval. The device also comprises means for receiving timer requests from the plurality of requesting processes, such as from hardware or software devices, objects, functions, subroutines, inline code, interrupt service routines, operating system calls, mainline code, etc. Each timer request specifies a time delay before an interrupt or other timer completion signal is required. Means are provided for selecting either the first timing means or the second timing means to time the timer request based upon the time delay of the request and the respective timing intervals of the first and second timing means. Means are also provided to issuing an interrupt or other timer completion signal to the requesting process following the specified delay as timed by the selected timing means.
In an exemplary embodiment of the invention, the device is either an implantable cardioverter defibrillator or a pacemaker. The first timing interval is about one millisecond and the second timing interval is about two seconds. The first timing means includes a short-term hardware timer having a counter storing two bytes of information, incremented by one bit every millisecond. The second timing means includes a long term or long-range hardware timer receiving a clock signal having a clock period of two seconds.
The processes performed by the implantable medical device include but are not limited to telemetry processing, non-invasive programmed stimulation, magnet application processing, bradycardia monitoring, data measurement and recording, battery and capacitor reformation, high voltage control, diagnostics, internal electrocardiogram detection and storage, memory integrity surveillance and morphology monitoring. The short-term timer is employed primarily for timing timer requests used in connection with telemetry, bradycardia monitoring, non-invasive programmer stimulation, high voltage control, internal electrocardiogram detection and storage and morphology monitoring. The long-term timer or clock is employed primarily for timing timer requests used in connection with bradycardia monitoring and data measurement and recording, and diagnostics.
By providing two separate timing means, one for timing short-term requests at high resolution and the other for timing long-term requests at low resolution, both power consumption and overall device size are reduced over systems providing a single high resolution timer for timing both short-term and long-term timer requests. In particular, because each timing means uses a timing increment appropriate for the duration of the overall process being timed, the number of memory registers required to implement each timer is reduced. Likewise, considerable power savings are achieved over systems employing a single high resolution timer capable of timing events over a period of many years. In the exemplary embodiment, the short-term timer operates only when short-term processes need to be timed and is turned off at all other times. Accordingly, for much of the lifetime of the implantable medical device, only the long-term timer is operating, and it is incremented only every two seconds. This represents a substantial power saving over devices that may employ a single timer incremented very often throughout the lifetime of the implantable medical device. Also, because fewer memory registers are required for implementing counters, the memory registers consume less power.
Other objects and advantages of the invention are provided as well. Method embodiments of the invention are also provided. Preferably, an implantable medical device configured in accordance with the invention implements and exploits both the first and second aspects of the invention by employing both short-term and long-term timers, each having an associated pseudo clock.